/**  
 * <p>Title: ServiceException.java</p>  
 * <p>Description: </p>  
 * <p>Copyright: Copyright (c) 2018</p>  
 * @author jiangheyu  
 * @date 2018年9月20日  
 * @version 1.0  
 */  
package com.xgf.exception.handler.exception;

import com.xgf.exception.handler.comment.ResponseUtility;

/**  
 * <p>Title: ServiceException</p>  
 * <p>Description: </p>  
 * @author jiangheyu
 * @date 2018年9月20日  
 */
public class ServiceException extends RuntimeException {
	/**  */
	private static final long serialVersionUID = 8964789935379338173L;
	private int errcode;
	private String errMsg;

    public ServiceException() {
        super();
        this.errcode=ResponseUtility.ERROR_OTHER;
    }

    public ServiceException(int errcode,String errMsg) {
    	super(errMsg);
    	this.errcode = errcode;
    	this.errMsg = errMsg;
    }
    
    public ServiceException(String errMsg) {
        super(errMsg);
        this.errcode=ResponseUtility.ERROR_OTHER;
    	this.errMsg = errMsg;
    }

    public ServiceException(String errMsg, Throwable cause) {
        super(errMsg, cause);
        this.errcode=ResponseUtility.ERROR_OTHER;
        this.errMsg = errMsg;
    }

    public ServiceException(Throwable cause) {
        super(cause);
        this.errcode=ResponseUtility.ERROR_OTHER;
    }
    
	public int getErrcode() {
		return errcode;
	}

	
	public void setErrcode(int errcode) {
		this.errcode = errcode;
	}

	public String getErrMsg() {
		return errMsg;
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}
	
}
